home *** CD-ROM | disk | FTP | other *** search
/ c't freeware shareware 2001 January / CT_SW0101.ISO / pc / software / kommunik / multimed / snakppc.sit / Snak 4.6.3 / Scripts / basical < prev    next >
Text File  |  2000-11-03  |  3KB  |  157 lines

  1. # This file is based on a file included with the standard distribution of ircII
  2. # It contains useful aliases for Snak. The aliases allows you to reduce the 
  3. # amount of typing. 
  4.  
  5. # basical and action are automatically loaded into each connection 
  6. # when the connection is opened
  7.  
  8. # Lines with '#' are comments that are not executed
  9.  
  10. # The format of a simple alias definition is simply the word "alias" followed by the name 
  11. # you give the new alias, and the actual contents of the alias.
  12.  
  13. # For more elaborate aliases, consisting of multiple lines of commands you need to put 
  14. # brackets around the commands like this:
  15.  
  16. # alias elaborateAlias {
  17. #     command1
  18. #     command 2
  19. # }
  20.  
  21. # See the oops alias in this file for an example of a multi line alias.
  22.  
  23. # To run the alias (and any other command) type /<name> and any necessary parameters 
  24. # and press enter in an input field. 
  25.  
  26.  
  27. alias F5 echo testing function keys
  28. alias F6 whois url
  29. alias Finger CTCP $0 FINGER
  30. alias Version CTCP $0 VERSION
  31. alias Time CTCP $0 TIME
  32. alias Userinfo CTCP $0 USERINFO
  33. alias Clientinfo CTCP $0 CLIENTINFO
  34. alias Chat DCC CHAT $0-
  35. alias DQuery DCC CHAT $0-
  36. alias tn mode $C +tn
  37. alias op mode $C +ooo
  38. alias deop mode $C -ooo
  39. alias ban mode $C +bbb
  40. alias ChannelClick query $E
  41. alias ConsoleClick msg $E $*
  42.  
  43. alias m msg
  44. alias i invite $0 $C
  45. alias a away
  46. alias c channel
  47. alias ch channel
  48. alias e exit
  49. alias h help
  50. alias j join
  51. alias l list
  52. alias log set log
  53. alias n names
  54. alias s signoff
  55. alias t topic
  56. alias w whois
  57. alias play sound
  58.  
  59. alias chop mo +o
  60. alias unchop mo -o $*
  61. alias mo mode $C $*
  62. alias k kick $C
  63. alias wdetected whois $D
  64. alias umode mode $N
  65.  
  66. alias mr msg $, $*
  67. alias ma msg $. $*
  68. alias wa whois $.
  69. alias ia invite $. $C
  70.  
  71. alias no notice
  72. alias nf notify
  73. alias la lastlog
  74.  
  75. alias " quote
  76. alias unalias alias -$*
  77.  
  78.  
  79. alias shields_up ignore $, msgs notices
  80. alias protect mode $C +ni
  81. alias unprotect mode $C -ni
  82. alias chops who $C -chop
  83. alias wjoin j $0
  84. alias talkto query $0
  85.  
  86. alias oops {
  87.     ^assign alias.oops $B
  88.     msg $. Sorry, that wasn't meant for you.
  89.     msg $0 $alias.oops
  90. }
  91.  
  92. alias dmsg msg =$0 $1-
  93. alias dquery /query =$0
  94.  
  95. # Functions for server control.
  96. # They only work if you are a server operator.
  97.  
  98. alias wo wallops
  99. alias ow operwall
  100.  
  101.  
  102. # utility function that returns the nick part of a nick!userhost string
  103. alias nickonly {@ FUNCTION_RETURN = left($index(! $0) $0)}
  104.  
  105.  
  106. # This lets you assign aliases for peoples nicknames.
  107. # For example, of you do: /ASSIGN BC BigCheese
  108. # Then you can do: /MSG BC Hi there!
  109.  
  110. alias msg {
  111.     if ( [$($0)] )
  112.     {
  113.         ${K}${K}msg $($0) $1-
  114.     }
  115.     {
  116.         ${K}${K}msg $0 $1-
  117.     }
  118. }
  119. alias query {
  120.     if ( [$($0)] )
  121.     {
  122.         ${K}${K}query $($0)
  123.     }
  124.     {
  125.         ${K}${K}query $0-
  126.     }
  127. }
  128.  
  129.  
  130. # The repeat and listtest aliases show how you can repeat an action a number of times
  131.  
  132. # Use a simply while loop to repeat a command. 
  133. # $0 is the number of times to do something
  134. # $1 is the string with the action to perform
  135.  
  136. # Usage "/repeat 5 echo Snak is a nice program"
  137. alias repeat {
  138.     @ rep.cnt = [$0]
  139.     while ( rep.cnt > 0 )
  140.     {
  141.         $1-
  142.         @rep.cnt = rep.cnt - 1
  143.     }
  144.     ^assign -rep.cnt
  145. }
  146.     
  147. # This steps over all numbered items in the array and echoes their value 
  148.  
  149. alias listtest {
  150.     assign blue.1 one
  151.     assign blue.2 two 
  152.     assign blue.3 three
  153.     foreach blue ii { echo $ii $blue[$ii] }
  154. }
  155.  
  156.  
  157.